$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("p_form_fbch_m")
    const dgrid1 = $NG.getCmpApi("p_form_fbch_d1")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()

    useUpdateRows(()=>{
        sumAmt()
    },"p_form_fbch_d1")
    function sumAmt(){
        const rows = dgrid1.getRows()
        rows.forEach(item=>{
            item.u_lr1 = (Number(item.u_dydcbhtje) || 0) - (Number(item.u_nfb1) || 0) - (Number(item.u_fyxj1) || 0)
            item.u_lr =  (Number(item.u_gcl) || 0) && (Number(item.u_lr1) || 0) / (Number(item.u_gcl) || 0)
            item.u_nfb1 = (Number(item.u_nfb) || 0) * (Number(item.u_gcl) || 0)
            item.u_cl1 = (Number(item.u_cl) || 0) * (Number(item.u_gcl) || 0)
            item.u_jx1 = (Number(item.u_jx) || 0) * (Number(item.u_gcl) || 0)
            item.u_qtfy1 = (Number(item.u_qtfy) || 0) * (Number(item.u_gcl) || 0)
            item.u_sj1 = (Number(item.u_sj) || 0) * (Number(item.u_gcl) || 0)
            item.u_u_dydcbhtje = (Number(item.u_lr1) || 0) * (Number(item.u_nfb1) || 0)
        })
    }
})